<article class="" id="post-">
<header class="entry-header">
<h1 class="entry-title">event.currentTarget</h1>
<div class="entry-meta">
						所属分类：<span class="category"><a href="/category/events/">事件</a> &gt; <a href="/category/events/event-object/">事件对象</a></span>
<span class="pull-right">英文文档：<a href="https://api.jquery123.com/event.currentTarget/" target="_blank">event.currentTarget</a></span>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<!-- .entry-header -->
<div class="entry-content">
<article class="entry property" id="event-currentTarget1"><h2 class="section-title">
<span>event.currentTarget</span><span class="returns">返回: <a href="/Types/#Element">Element</a></span>
</h2>
<div class="entry-wrapper">
<p class="desc"><strong>描述: </strong> 在事件冒泡过程中的当前DOM元素。</p>
<ul class="signatures"><li class="signature"><h4 class="name">
<span class="version-details">添加的版本: <a href="/category/version/1.3/">1.3</a></span>event.currentTarget</h4></li></ul>
<div class="longdesc" id="entry-longdesc">
<p>这个属性总是等于函数的<code>this</code>。</p>
<p>
<em>如果您使用<a href="/jQuery.proxy">jQuery.proxy</a>或另一种形式操作作用域，<code>this</code> 将等于您所提供的context（上下文），而不是<code>event.currentTarget</code></em>
</p>
</div>
<section class="entry-examples" id="entry-examples"><header><h2 class="underline">例子:</h2></header><div class="entry-example" id="example-0">
<h4><span class="desc">
			警报currentTarget的匹配`this`关键字。</span></h4>
<div class="syntaxhighlighter javascript ">
<table>
<tbody>
<tr>
<td class="gutter">
<div class="line n1">1</div>
<div class="line n2">2</div>
<div class="line n3">3</div>
</td>
<td class="code">
<pre><div class="container"><div class="line"><code>$(<span class="string">"p"</span>).click(<span class="keyword">function</span>(event) {</code></div></div><div class="container"><div class="line"><code>  alert( event.currentTarget === <span class="keyword">this</span> ); <span class="comment">// true</span></code></div></div><div class="container"><div class="line"><code>});  </code></div></div></pre>
</td>
</tr>
</tbody>
</table>
</div>
</div></section>
</div></article> </div>
</article>